package phonecompany.customer;

import java.io.Serializable;

/**
 * A class defines the customers' names.
 * 
 * @since Oct 24, 2011
 * @author <a href="mailto:zexpp5@gmail.com">Zexu.Lin</a>
 * @version $Id: CustomerName.java 28 2011-10-30 21:25:58Z zexpp5@gmail.com $
 * 
 */
public class CustomerName implements Serializable {
	private String firstName;
	private String middleName;
	private String lastName;

	public CustomerName(String firstName, String middleName, String lastName) {
		this.firstName = firstName;
		this.middleName = middleName;
		this.lastName = lastName;

	}

	/**
	 * get the first name ,middle name and the last name of a customer.
	 * 
	 * @return
	 * @description to get the full name like "Mary.M.Potter"
	 * 
	 * @author <a href="mailto:zexpp5@gmail.com">Zexu.Lin</a>
	 * @update Oct 24, 2011 9:19:56 PM
	 */
	public String getFullName() {
		return firstName + "." + middleName + "." + lastName;
	}

	/**
	 * 
	 * @return
	 * @description to get the first name of current customer
	 * 
	 * @author <a href="mailto:zexpp5@gmail.com">Zexu.Lin</a>
	 * @update Oct 30, 2011 7:23:08 PM
	 */
	public String getFirstName() {
		return firstName;
	}

	/**
	 * 
	 * @param firstName
	 * @description set current customer's first name
	 * 
	 * @author <a href="mailto:zexpp5@gmail.com">Zexu.Lin</a>
	 * @update Oct 30, 2011 7:24:16 PM
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * 
	 * @return
	 * @description to get the middle name of current customer
	 * 
	 * @author <a href="mailto:zexpp5@gmail.com">Zexu.Lin</a>
	 * @update Oct 30, 2011 7:23:57 PM
	 */
	public String getMiddleName() {
		return middleName;
	}

	/**
	 * 
	 * @param middleName
	 * @description set current customer's middle name
	 * 
	 * @author <a href="mailto:zexpp5@gmail.com">Zexu.Lin</a>
	 * @update Oct 30, 2011 7:24:36 PM
	 */
	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}

	/**
	 * 
	 * @return
	 * @description to get the last name of current customer
	 * 
	 * @author <a href="mailto:zexpp5@gmail.com">Zexu.Lin</a>
	 * @update Oct 30, 2011 7:24:04 PM
	 */
	public String getLastName() {
		return lastName;
	}

	/**
	 * 
	 * @param lastName
	 * @description set current customer's last name
	 * 
	 * @author <a href="mailto:zexpp5@gmail.com">Zexu.Lin</a>
	 * @update Oct 30, 2011 7:24:46 PM
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/**
	 * An overrided method which will return the full name of the customer's
	 * name.
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return getFullName();
	}
}
